import request from '@/utils/request'

// 查询回收站列表
export function listCollection(query) {
  return request({
    url: '/baseplatform/collection/list',
    method: 'get',
    params: query
  })
}

// 查询回收站详细
export function getCollection(id) {
  return request({
    url: '/baseplatform/collection/' + id,
    method: 'get'
  })
}

// 新增回收站
export function addCollection(data) {
  return request({
    url: '/baseplatform/collection',
    method: 'post',
    data: data
  })
}

// 修改回收站
export function updateCollection(data) {
  return request({
    url: '/baseplatform/collection',
    method: 'put',
    data: data
  })
}

// 删除回收站
export function delCollection(id) {
  return request({
    url: '/baseplatform/collection/' + id,
    method: 'delete'
  })
}
// 还原
export function handleRevert(id) {
  return request({
    url: '/baseplatform/collection/revert',
    data:{ids:id},
    method: 'post'
  })
}
